﻿<u:UObject x:Class="UTable.Objects.UOpenFileDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:u="clr-namespace:UTable.Objects.Controls;assembly=UTable.Core"
    xmlns:uc="clr-namespace:UTable.Objects.Controls"
    xmlns:local="clr-namespace:UTable.Objects"
    Height="420" Width="360" Title="Open File">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="50" />
            <RowDefinition Height="*" />
            <RowDefinition Height="50" />
        </Grid.RowDefinitions>
        <TextBlock Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type u:UObject}}, Path=Title}" 
                   HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="24" Grid.Row="0"/>
        <Grid Grid.Row="1">
            <uc:UFileExplorer x:Name="Explorer"/>
        </Grid>
        <Grid Grid.Row="2">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <u:UButton x:Name="OpenButton" Click="OpenButton_Click" Margin="10, 5, 0, 5" Width="150" HorizontalAlignment="Left" GlowBrush="Yellow">Open</u:UButton>
                <u:UButton x:Name="CancelButton" Click="CancelButton_Click" Grid.Column="1" Margin="0, 5, 10, 5" Width="150" HorizontalAlignment="Right" GlowBrush="Yellow">Cancel</u:UButton>
            </Grid>
        </Grid>
    </Grid>
</u:UObject>
